<div ng-controller="userInfoCtrl">
  <div class="col-md-7 header-right">
    <form id="userForm" ng-submit="updateUser()">
      	<h6>
          个人信息
          <span class="editInfoBtn" ng-click="editUser()">
            <i ng-if="!edit" class="fa fa-edit"></i>

          </span>
          <button class="editInfoBtn" ng-if="edit" type="submit"><i class="fa fa-check"></i></button>
          <span ng-if="edit" class="editInfoBtn" ng-click="cancelUser()">
            <button><i class="fa fa-times"></i></button>
          </span>
        </h6>
  	   <ul class="address">
      	<li>
      			<ul class="address-text">
      				<li><b>账号</b></li>
      				<li>{{user.account}}</li>
      			</ul>
      		</li>
      		<li>
      			<ul class="address-text">
      				<li><b>真实姓名</b></li>
      				<li ng-if="!edit">{{user.userName}}</li>
              <li ng-if="edit"><input type="text" required ng-model="newuser.userName"/></li>
      			</ul>
      		</li>
      		<li>
      			<ul class="address-text">
      				<li><b>手机号码</b></li>
      				<li ng-if="!edit">{{user.phone}}</li>
              <li ng-if="edit"><input type="text" required ng-model="newuser.phone"/></li>
      			</ul>
      		</li>
      		<li>
      			<ul class="address-text">
      				<li><b>电子邮箱</b></li>
      				<li ng-if="!edit">{{user.email}}</li>
              <li ng-if="edit"><input type="email" required ng-model="newuser.email"/></li>
      			</ul>
      		</li>
      		<li>
      			<ul class="address-text">
      				<li><b>所属部门</b></li>
      				<li ng-if="!edit">{{user.companyName}}</li>
              <li ng-if="edit">
                <select ng-model="newuser.companyId" required>
                  <option ng-repeat="x in companys" ng-value="x.companyId">{{x.companyName}}</option>
                </select>
              </li>
      			</ul>
      		</li>
      	</ul>
    </form>
  </div>
</div>
